Extracts file path our of filename. E.G c:\temp\setup.exe returns c:\temp usage: Dim x as Long x =
Extracts file path our of filename. E.G c:\temp\setup.exe returns c:\temp usage: Dim x as Long x = GetFilePath(filename)
Rate Extracts file path our of filename. E.G c:\temp\setup.exe returns c:\temp usage: Dim x as Long x =
(1(1 Vote))
Dim x As String
Dim position As Integer
Dim y As Integer
Dim myPath As String
x = filename
For y = Len(x) To 1 Step -1
If Mid(x, y, 1) = "\" Then
position = y - 1
Exit For
End If
Next y
myPath = Left(x, position)
GetFilePath = Format(myPath)
End Function
Extracts file path our of filename. E.G c:\temp\setup.exe returns c:\temp usage: Dim x as Long x = Comments
No comments yet — be the first to post one!
Post a Comment